/**
 * @Method VeComponent
 * @Description TODO
 * @Date 2021/1/20 11:14
 * @Created by HePing
 */
export default {
  name: 'VeComponent',
  model: {
    prop: 'model'
  },
  props: {
    model: {},
    tag: {
      type: String,
      default: ''
    },
    config: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  render(h) {
    const vm = this
    if (!vm.tag) return
    return h(
      vm.tag,
      {
        props: {
          model: vm.model,
          config: vm.config
        },
        on: vm.$listeners
      },
      vm.$slots.default
    )
  }
}
